﻿Public Class HolidayWrapper
#Region "Properties"

    Public _holidayDate As String
    Public Property HolidayDate As String
        Get
            Return _holidayDate
        End Get
        Set(ByVal value As String)
            _holidayDate = value
        End Set
    End Property

    Public _description As String
    Public Property Description As String
        Get
            Return _description
        End Get
        Set(ByVal value As String)
            _description = value
        End Set
    End Property

#End Region

    Public Shared Function ConvertToWrapperList(ByVal source As IEnumerable(Of Equipment.DataAccess.Holiday)) As List(Of HolidayWrapper)
        Dim wrapperList As New List(Of HolidayWrapper)

        For Each h In source
            Dim w As New HolidayWrapper
            w.HolidayDate = h.HolidayDate.ToString("dd-MMM-yyyy")
            w.Description = h.Description
            wrapperList.Add(w)
        Next

        Return wrapperList
    End Function
End Class
